﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="AnswerEdit.aspx.cs" Inherits="ProjectSem40701.Admin.AnswerEdit" ValidateRequest="false" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="title" runat="server">
    <title>Cập nhật câu trả lời</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <!--
        set tab active here
     -->
    <script type="text/javascript" language="javascript">
        setTab(document.getElementById("6"));
    </script>
    <!--
        end set tab active
     -->
     <div id="box">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>      
        <h3>Thêm mới câu trả lời</h3>
        <fieldset>
            <legend>
                Thêm mới câu trả lời
            </legend>            
            
            <label>Nội dung</label>
            <fckeditorv2:fckeditor ID="txtAnswerContent" runat="server" BasePath="../fck/" 
                Height="350px" Width="550px">
            </fckeditorv2:fckeditor>     
   
            <p>
                <label>Đúng/sai:</label>
                <asp:CheckBox ID="chkbCorrect" runat="server" />
            </p>
            <p>
                <label>Tiêu đề:</label>
                <asp:TextBox ID="txtAnswerTitle" runat="server" Width="150px"></asp:TextBox>
            </p>  
            <p>
                <label>Trạng thái:</label>
                <asp:DropDownList ID="cbbAnswerStatus" runat="server" Width="158px">
                    <asp:ListItem Value="1">Hoạt động</asp:ListItem>
                    <asp:ListItem Value="0">Khóa</asp:ListItem>
                </asp:DropDownList>
            </p>             
            </fieldset>
            
            <div align="center">
            <asp:Button ID="btnUpdate" runat="server" Text="Cập nhật" CssClass="button" 
                onclick="btnUpdate_Click" />
            <cc1:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" 
                ConfirmText="Bạn có thực sự muốn cập nhật câu trả lời này?" Enabled="True" 
                    TargetControlID="btnUpdate">
            </cc1:ConfirmButtonExtender>
            <asp:Button ID="btnDel" runat="server" onclick="btnDel_Click" Text="Xóa" />
            <cc1:ConfirmButtonExtender ID="ConfirmButtonExtender2" runat="server" 
                ConfirmText="Bạn có thực sự muốn xóa câu trả lời này?" Enabled="True" 
                    TargetControlID="btnDel">
            </cc1:ConfirmButtonExtender>
        </div>
    </div>
    
    <%-- Thông báo thành công hay thất bại ở đây--%>
    <cc1:ModalPopupExtender ID="btnUpdate_ModalPopupExtender" runat="server" 
                DynamicServicePath="" Enabled="False" TargetControlID="btnUpdate" 
                BackgroundCssClass="modalBackground"
                PopupControlID="pnlPopup" >
    </cc1:ModalPopupExtender>
    
     <cc1:ModalPopupExtender ID="btnDelete_ModalPopupExtender" runat="server" 
                DynamicServicePath="" Enabled="False" TargetControlID="btnDel"
                BackgroundCssClass="modalBackground"
                PopupControlID="pnlPopup" >
    </cc1:ModalPopupExtender>


    <asp:Panel ID="pnlPopup" runat="server" CssClass="confirm-dialog" style="display:none;">
        <div class="inner">
            <h2>
                <asp:Literal ID="ltrMessage" runat="server"></asp:Literal>
            </h2>
            <div class="base">
                <asp:Label ID="lblSuccess" runat="server" Text="" Visible="false"></asp:Label>
                <asp:Button ID="btnYes" onclick="btnYes_Click" runat="server" Text="Yes" Font-Bold="False" />                            
                <asp:LinkButton ID="LinkButton1" runat="server" CssClass="close" OnClick="btnClose_Click"
                    OnClientClick="$find('mdlPopup').hide(); return false;" />
            </div>
        </div>
    </asp:Panel>
    
 </asp:Content>
